import redis

#定义地址和端口
host = '127.0.0.1'
port = 6379

#打印过期时间
r = redis.Redis(host=host,port=port)
print(r.ttl('liuyue'))

#打印列表长度
print(r.llen("liuyue"))

if r.llen("liuyue") > 5:
	print('您的账号被锁定了')
#建立redis连接
# r = redis.Redis(host=host,port=port)
#
# #声明一个值
# r.set('test','123')
#
# #取值
# code = r.get('test')
#
# #转码
# code = code.decode('utf-8')
#
# print(code)